import Router from 'koa-router';
import {getAllCollections} from '../chroma/index.js'
const get_knowledge_base_list = new Router();

get_knowledge_base_list.get('/', async (ctx) => {
    try {
        ctx.body = {
            code: 200,
            data: getAllCollections()
        };
    }catch (e) {
        ctx.status = 500
        ctx.body = {
            code: 500,
            message: '服务器内部错误'
        }
        console.log(e.name + "：" + e.message)
    }
})
export default get_knowledge_base_list
